package com.example.sfm.pojo.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDate;

@Data
@Schema(name = "奖惩记录导入模板",description = "用于导入奖惩记录的Excel模板")
@AllArgsConstructor
@NoArgsConstructor
public class AwardsPunishmentsImportDto {
    @ExcelProperty("学号")
    @Schema(description = "学号")
    private String studentNumber;

    @ExcelProperty("奖惩名称")
    @NotBlank
    @Schema(description = "奖惩名称")
    private String name;

    @ExcelProperty("类型（0-1）0惩罚 1奖励")
    @Range(min = 0, max = 1)
    @Schema(description = "类型（0-1）0惩罚 1奖励")
    private Integer type;

    @ExcelProperty("等级（0-1）0一般 1严重")
    @Range(min = 0, max = 1)
    @Schema(description = "等级（0-1）0一般 1严重")
    private Integer level;

    @ExcelProperty("原因")
    @NotBlank
    @Size(max = 500)
    @Schema(description = "原因")
    private String reason;

    @ExcelProperty("颁发日期（yyyy-MM-dd）")
    @DateTimeFormat("yyyy-MM-dd")
    @Schema(description = "颁发日期（yyyy-MM-dd）")
    private LocalDate issuedDate;
}
